<template>
  <Dialog title="渠道二维码" v-model="dialogVisible" width="350px">
    <Qrcode :text="qrcodeUrl" :width="310" />
    <template #footer>
      <el-button @click="dialogVisible = false">关闭</el-button>
    </template>
  </Dialog>
</template>
<script setup lang="ts">
import { Qrcode } from '@/components/Qrcode'

const qrcodeUrl = ref('')
const dialogVisible = ref(false) // 弹窗的是否展示
/** 打开弹窗 */
const open = async (url: string) => {
  dialogVisible.value = true
  qrcodeUrl.value = url
}
defineExpose({ open }) // 提供 open 方法，用于打开弹窗
</script>
<style scoped>
.el-select {
  width: 100%;
}
</style>
